package com.zzxy.springSun.dao.impl;

import com.zzxy.springSun.dao.IAccountDao;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.test.context.jdbc.Sql;

public class AccountDaoImpl extends JdbcDaoSupport implements IAccountDao {
    @Override
    public void out(String outer, int money) {
        this.getJdbcTemplate().update("update account set money = money - ? where username = ?", money, outer);
    }

    @Override
    public void in(String inner, int money) {
        this.getJdbcTemplate().update("update account set money = money + ? where username = ?", money, inner);
    }
}
